﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html>
    <head>
        <meta content="Innovasys Document! X (http://www.innovasys.com)" name=GENERATOR>
        <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
        <!--DXMETADATA start type="PageItemTitle" format="<title>RecentFileList Property (XtremeCommandBars)</title>" --><title>RecentFileList Property</title><!--DXMETADATA end-->
        <link href="stylesheets/axstylesheet.css" type=text/css rel=stylesheet>
        <script src="script/ax.js" type=text/javascript>
    </script>

    


<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
    <body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(7069);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../index.htm?page=XtremeCommandBars~CommandBars~RecentFileList.html";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="XtremeCommandBars~CommandBarEdit~ReadOnly.html" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="template2/btn_prev_n.gif" border="0"></a><A href="XtremeCommandBars~CommandBarsFrame~RecentFileList.html" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="welcome_screen.htm">Codejock ActiveX Controls v15.3</A> &gt; <A href="XtremeCommandBars_P.html">Xtreme Command Bars</A> &gt; Properties &gt; </div>
	<div id="winchm_template_title">RecentFileList Property (XtremeCommandBars)</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div class=popupbubble id=dxseealsomenu><p id=dxseealsocontent><a href="#Bookmark4634">CommandBars Control</a>
&nbsp;|&nbsp;<a href="#Bookmark4652">CreateCommandBarControl Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5307">RecentFileList Object</a>
&nbsp;|&nbsp;<a href="#Bookmark7520">XTPCommandBarsSpecialCommands Enumeration</a>
</p><!--DXMETADATA end --> 
        </div>
        <!--DXMETADATA start type="FilteredItemList" scrap="PARAMETERS_BUBBLES" namespace="parameter" source="Item" --><!--DXMETADATA end --> 
        <div id=pagetop>
            <div id=projectnamebanner>
                <table class=projectnametable cellspacing=0>
                    <tbody>
                        <tr>
                            <!--DXMETADATA start type="Literal" condition="childitems:itemtype=seealso" value="<td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td>" --><td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td><!--DXMETADATA end -->
                            <td>
                                <!--DXMETADATA start type="Phrase" Name="Product_Header" -->Xtreme Command Bars ActiveX Control v15.3<!--DXMETADATA end --> 
                            </td>
                            <td align=right>
                                <!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><!--DXMETADATA end -->
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div id=pagetitlebanner>
                <h1 class=dxh1>
                <!--DXMETADATA start type="PageItemTitle" -->RecentFileList Property<!--DXMETADATA end --></h1>
            </div>
        </div>
        <div id=pagebody valign="bottom">
            <!--DXMETADATA start type="IsNew" format="<script>document.all.pagebody.className = 'newTopic'</script>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Description" source="Item" format="<h4 class=dxh4>$$Description$$</h4><p>%%description%%</p>" --><h4 class=dxh4>Description</h4><p>Recent File List</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="PropertyAccessDescription" format="<h4 class=dxh4>$$Property_Type$$</h4><p>%%PropertyAccessDescription%%</p>" --><h4 class=dxh4>Property type</h4><p>Read-only property</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Syntax" lang="VB" format="<div Class=LanguageSpecific Name=Syntax_VB><h4 class=dxh4>$$Syntax$$ (Visual Basic)</h4><p>%%Syntax%%</p></div>" --><div Class=LanguageSpecific Name=Syntax_VB><h4 class=dxh4>Syntax (Visual Basic)</h4><p><PRE CLASS="syntax" LANG="VB"><strong>Public Property RecentFileList</strong>()<strong> As <a href="#Bookmark5307">RecentFileList</a></strong></PRE></p></div><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="PARAMETERS_LIST" namespace="parameter" source="Item" filter="" format="<h4 class=dxh4>$$ParameterList$$</h4>%%filtereditemlist%%" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##RETURNS" format="<h4 class=dxh4>$$Return_Type$$</h4><p>%%comment%%</p>" --><h4 class=dxh4>Return Type</h4><p>Reference to the <A href="#Bookmark5307">RecentFileList</A>&nbsp;displayed for the commandbars.</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##REMARKS" format="<h4 class=dxh4>$$Remarks$$</h4><p>%%comment%%</p>" --><h4 class=dxh4>Remarks</h4><p><P>A Recent File List or MRU is used to display a recent list of opened files in the menu.</P>
<P>&nbsp;</P>
<P>Basic Steps to create a MRU (Office 2007 and older styles):</P>
<P>1. To manage the recent file list you need to use the <A href="#Bookmark5307">CommandBars.RecentFileList</A> methods</P>
<P>2. To add a control to your Menu that will show the MRU&nbsp;recent file list you must create a&nbsp;<STRONG>CXTPControlRecentFileList</STRONG> control with the <A href="#Bookmark4652">CreateCommandBarControl</A>&nbsp;method and set it's ID to <STRONG>XTP_ID_FILE_MRU</STRONG>.</P>
<P>3. To create a pinnable Recent File list for the&nbsp;Ribbon ribbon&nbsp;create <STRONG>CXTPRibbonControlSystemRecentFileList</STRONG> using the&nbsp;<A href="#Bookmark4652">CreateCommandBarControl</A>&nbsp;method and set it's ID to <STRONG>XTP_ID_FILE_MRU</STRONG>.</P>
<P>4. Recent File List will be Saved/Loaded when you call LoadCommandBars/SaveCommandBars.</P>
<P>5. To catch an&nbsp;event when the user selects a&nbsp;Recent File list in the menu you need to add in the&nbsp;<A href="#Bookmark4716">Execute</A> even a&nbsp;handler for the <STRONG>XTP_ID_FILE_MRU</STRONG> id (or any Id that the&nbsp;user assigned for this control) and use the <A href="#Bookmark5324">path name</A>&nbsp;property&nbsp; to get path to file.</P>
<P>6. When adding items to the MRU you must specify the complete path to the file, however, only the filename will get displayed.&nbsp; A tooltip will display the full path to the file.&nbsp; You can get the full path from the <A href="#Bookmark5324">path name</A>&nbsp;property when in the <STRONG>Execute</STRONG> event.</P>
<P>&nbsp;</P>
<P>The following lists information about the <A href="#Bookmark5318">RecentFileListItem</A>&nbsp;object that is used to represent items in the <A href="#Bookmark5307">RecentFileList</A>&nbsp;and also lists sample code to create both Office 2007 and Office 2010 style lists.</P>
<P>&nbsp;</P>
<P><A href="#Bookmark5318">RecentFileListItem</A>&nbsp;represents&nbsp;an item entry that is displayed in a <A href="#Bookmark5307">RecentFileList</A> and&nbsp;contains the caption, icon, file path name and pinned status for the item.</P>
<P>&nbsp;</P>
<P>When the <A href="#Bookmark5318">RecentFileListItem</A>&nbsp;is added to a standard Recent File List the caption is what is displayed for the item in the list.&nbsp; This is also true for the Office 2007 style list.&nbsp; When using the Office 2010 style list the caption is not displayed in the list.</P>
<P>&nbsp;</P>
<P>The <A href="#Bookmark5323">icon Id</A> is only used to display an icon in Office 2007 and older recent file lists.&nbsp; Using the Office 2010 style list this Id is not used and instead the icon used by the system for that file type will be used.</P>
<P>&nbsp;</P>
<P>The <A href="#Bookmark5324">path name</A> is used to store the entire path <STRONG>including</STRONG> filename.&nbsp; For Office 2007 and older styles recent file list the path name is displayed as a tooltip for the <A href="#Bookmark5318">RecentFileListItem</A>, the <A href="#Bookmark5322">caption</A>&nbsp;is only displayed&nbsp;for this item.&nbsp; For Office 2010 style list the path name is fully displayed in the item as 2 lines, the first line contains the file name and the second contains the entire path to the file name.</P>
<P>&nbsp;</P>
<P>The <A href="#Bookmark5325">pinned</A> state of the item will display a pin icon to the right of the item if <A href="#Bookmark5317">Pinable</A> is <STRONG>True</STRONG> for the <A href="#Bookmark5307">RecentFileList</A>.&nbsp; When the item is "pinned" it will be displayed at the top of the list, regardless of the order it was added for Office 2010 style lists.&nbsp; By default items are listed in the order in which they were added.&nbsp; When "pinned", the pin icon will also change showing the item is in fact pinned.&nbsp; For Office 2007 style and older lists "pinned" items will remain in the order they were added.</P>
<P>&nbsp;</P>
<P><STRONG>Office 2010 style list</STRONG> using the Office2010 style <A href="#Bookmark3969">BackstageListBox</A> to display the RecentFileList<STRONG>:</STRONG></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;Dim RecentFileList As RecentFileList</P>
<P>&nbsp;&nbsp;&nbsp; RecentFileListBox.ToolTipContext.Style = xtpToolTipResource</P>
<P>&nbsp;&nbsp;&nbsp; CommandBars.RecentFileList.Add "C:\Program Files\Test1.xml"</P>
<P>&nbsp;&nbsp;&nbsp; CommandBars.RecentFileList.Add "C:\Program Files\Test2.xml"<BR>&nbsp;&nbsp;&nbsp; RecentFileListBox.CreateRecentFileListItems RecentFileList</P>
<P>&nbsp;</P>
<P><STRONG>Office 2007 style list:</STRONG></P>
<P>&nbsp;&nbsp;&nbsp; Dim RibbonBar As RibbonBar<BR>&nbsp;&nbsp;&nbsp; Set RibbonBar = CommandBars.ActiveMenuBar<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set ControlFile = RibbonBar.AddSystemButton<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Dim PopupBar As CommandBar<BR>&nbsp;&nbsp;&nbsp; Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBar")<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set ControlFile.CommandBar = PopupBar</P>
<P>&nbsp;</P>
<P>&nbsp;&nbsp;&nbsp; CommandBars.RecentFileList.Add "C:\Program Files\Test1.xml"</P>
<P>&nbsp;&nbsp;&nbsp; CommandBars.RecentFileList.Add "C:\Program Files\Test2.xml"<BR>&nbsp;</P>
<P>&nbsp;&nbsp;&nbsp; With PopupBar.Controls&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemRecentFileList")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.Caption = "Recent Documents"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.BeginGroup = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.Id = XTP_ID_FILE_MRU<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddControl Control</P>
<P>&nbsp;&nbsp;&nbsp; End With</P>
<P>&nbsp;</P>
<P>Office 2010 style:<BR><IMG src="office2010recentfilelist.png"></P>
<P>&nbsp;</P>
<P>Office 2007 style:<BR><IMG src="office2007recentfilelist.png"></P></p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="sourcecode" format="<h4 class=dxh4>$$Source_Code$$</h4><table border=0 cellpadding=0 cellspacing=0 class=sourcecode><tr><td nowrap>%%sourcecode%%</td></tr></table>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##EXAMPLEINTRO" format="<h4 class=dxh4>$$Example$$</h4><p>%%comment%%</p>" --><h4 class=dxh4>Example</h4><p><P>&nbsp;&nbsp;&nbsp; Dim ControlFile As CommandBarPopup<BR>&nbsp;&nbsp;&nbsp; Dim&nbsp;Control As CommandBarControl<BR>&nbsp;&nbsp;&nbsp; Dim PopupBar As CommandBar<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set ControlFile = RibbonBar.AddSystemButton()<BR>&nbsp;&nbsp;&nbsp; ControlFile.IconId = ID_SYSTEM_ICON<BR>&nbsp;&nbsp;&nbsp; ControlFile.Caption = "&amp;File"<BR>&nbsp;&nbsp;&nbsp; With ControlFile.CommandBar.Controls</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemRecentFileList")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.Caption = "Recent Documents"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.BeginGroup = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.Id = XTP_ID_FILE_MRU<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddControl Control<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.RecentFileList.Add "C:\Untitled.txt"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.RecentFileList.Add "C:\Program Files\Untitled2.txt"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CommandBars.RecentFileList.Add "Untitled3.txt"<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ControlFile.CommandBar.SetIconSize 32, 32<BR>&nbsp;&nbsp;&nbsp; End With</P>
<P>&nbsp;</P>
<P>Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)<BR>&nbsp;&nbsp;&nbsp; On Error Resume Next<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Select Case Control.Id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case XTPCommandBarsSpecialCommands.XTP_ID_FILE_MRU:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print Control.Caption &amp; " clicked."<BR>&nbsp;&nbsp;&nbsp; End Select<BR>End Sub</P></p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="INLINE_EXAMPLE" namespace="Example" source="Item" filter="type=inline" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$Example$$</h4>,format= %%%%filtereditemlist%%" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="seealso" source="Item" filter="" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$See_Also$$</h4><p id=dxseealsocontent>%%filtereditemlist%%</p>" --><h4 class=dxh4>See Also</h4><p id=dxseealsocontent><a href="#Bookmark4634">CommandBars Control</a>
&nbsp;|&nbsp;<a href="#Bookmark4652">CreateCommandBarControl Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5307">RecentFileList Object</a>
&nbsp;|&nbsp;<a href="#Bookmark7520">XTPCommandBarsSpecialCommands Enumeration</a>
</p><!--DXMETADATA end --><!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="example" source="Item" filter="type=linked" NoHeader="True" NoFooter="True" format="><!--DXMETADATA end --><!--DXMETADATA start type="Variable" name="CopyrightNotice" format="><!--DXMETADATA end --></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2018. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>

